package com.hy.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hy.appMedicine.dto.MedicineQueryDTO;
import com.hy.medicine.MedicineBasicInfo;
import com.hy.medicine.dto.MedicineSearchDTO;
import com.hy.medicine.vo.MedicineBasicInfoVo;
import com.hy.util.Result;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Serializable;

/**
 * @author Lenovo
 * @description 针对表【medicine_basic_info(药品基本信息表)】的数据库操作Service
 * @createDate 2025-03-11 19:16:10
 */
public interface MedicineBasicInfoService extends IService<MedicineBasicInfo> {
    /**
     * 查询药品基本信息表
     */
    Result<Serializable> getMedicineInfo(MedicineBasicInfoVo medicineBasicInfoVo);

    /**
     * 导出药品信息到Excel
     */
    void exportMedicine(MedicineBasicInfoVo medicineBasicInfoVo, HttpServletResponse response) throws IOException;

    /**
     * 从Excel导入药品信息
     */
    Result<Serializable> importMedicine(MultipartFile file);

    /**
     * 下载导入模板
     */
    void downloadTemplate(HttpServletResponse response) throws IOException;

    /**
     * 搜索药品列表
     * @param dto 搜索条件
     * @return 分页结果
     */
    Result searchMedicineList(MedicineSearchDTO dto);




    /**
     * 新增药品
     * @param medicineBasicInfo 药品信息
     * @return Result
     */
    Result addMedicine(MedicineBasicInfo medicineBasicInfo);

    /**
     * 更新药品信息
     * @param medicineBasicInfo 药品信息
     * @return Result
     */
    Result updateMedicine(MedicineBasicInfo medicineBasicInfo);

    /**
     * 删除药品
     * @param medicineBasicInfo 药品ID
     * @return Result
     */
    Result deleteMedicine(MedicineBasicInfo medicineBasicInfo);

    /**
     * 获取药品详情
     * @param medicineId 药品ID
     * @return Result
     */
    Result getMedicineDetail(Integer medicineId);

    /**
     * 获取药品库存列表
     * @param queryDTO 查询条件
     * @return Result
     */
    Result searchMedicineSockList(MedicineQueryDTO queryDTO);
}
